//
//  InputTempletElevenTableViewCell.m
//  CedarFinancePH
//
//  Created by menchao on 2018/12/18.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import "InputTempletElevenTableViewCell.h"

@interface InputTempletElevenTableViewCell ()

@property (nonatomic,strong) UILabel *titleLbl;
@property (nonatomic,strong) UILabel *subtitleLbl;


@end

@implementation InputTempletElevenTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self!=nil){
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self.contentView addSubview:self.titleLbl];
        [self.contentView addSubview:self.subtitleLbl];
        [self.titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).mas_offset(kMarginOffsetX);
            make.centerY.mas_equalTo(self.contentView);
        }];
        [self.subtitleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self.titleLbl);
            make.left.mas_equalTo(self.titleLbl.mas_right).mas_offset(20);
        }];
    }
    return self;
}

- (void)updateTitle:(NSString *)title subTitle:(NSString *)subTitle{
    self.titleLbl.text = title;
    self.subtitleLbl.text = subTitle;
    [self setSubTitleColor:kGrayColor fontSize:14];
}

- (void)setSubTitleColor:(UIColor *)color fontSize:(CGFloat)size{
    self.subtitleLbl.textColor = color;
    self.subtitleLbl.font = PingFangZhongChangGuiForFont(size);
}

MACRO_UILabel_LazyloadWithPFCGFont(titleLbl, @"",kBlackColor, 14)
MACRO_UILabel_LazyloadWithPFCGFont(subtitleLbl, @"",kGrayColor, 14)

@end
